package com.lyl.excel.excel;

import com.alibaba.excel.annotation.ExcelProperty;
import com.lyl.excel.valid.ExcelError;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;

/**
 * @author Mr.Luo
 * @date 2022-09-27 16:43
 * @desc
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Emp extends ExcelError {

    private Integer id;
    @NotBlank(message = "姓名不能为空")
    @ExcelProperty("姓名")
    private String name;
    @Digits(integer = 1, fraction = 20)
    @ExcelProperty("性别")
    private Integer sex;
    @ExcelProperty("年龄")
    private Integer age;
}
